# Maintainer:
pkgname=py3-lhafile
pkgver=0.3.0
pkgrel=4
pkgdesc="LHA archive support for Python"
url="https://github.com/FrodeSolheim/python-lhafile"
arch="all"
license="BSD-3-Clause"
depends="python3"
makedepends="python3-dev py3-setuptools"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/FrodeSolheim/python-lhafile/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/python-lhafile-$pkgver"
options="!check" # tests fail on python3

build() {
	python3 setup.py build
}

check() {
	cd lhafile/tests
	PYTHONPATH="$(echo "$builddir"/build/lib*)" pytest
}

package() {
	python3 setup.py install --skip-build --root="$pkgdir"
}

sha512sums="
bb4db2767a702d30f2e713e5f7890d619de312d609761ade2ff8f4e99ffede8e35a72cd116abf3b8ea29b0885ebe2c993dc37f44722c8e5fe346be93dfdbbf81  py3-lhafile-0.3.0.tar.gz
"
